#include "Frame.hpp"

Frame::Frame(ImageRessource* resource) : _resource(resource)
{
	m_subRect.Top = 0;
	m_subRect.Left = 0;

	m_subRect.Bottom = _resource->Ressource()->GetHeight();
	m_subRect.Right = _resource->Ressource()->GetWidth();
}
Frame::Frame(const Frame &frame)
{
    m_subRect = frame.SubRect();
    SetImageResource(frame.ImageResource());
}

Frame::Frame(ImageRessource* resource, sf::IntRect subRect) : _resource(resource)
{
	m_subRect = subRect;
}

sf::IntRect Frame::SubRect() const
{
	return m_subRect;
}

void Frame::SetSubRect(sf::IntRect subRect)
{
	m_subRect = subRect;
}

ImageRessource* Frame::ImageResource() const
{
	return _resource;
}

void Frame::SetImageResource(ImageRessource* resource)
{
	_resource = resource;
}
